<template>
	<view class="container">
		<tui-grid style="margin-top: 46upx;">
			<block v-for="(item,index) in list" :key="index">
				<tui-grid-item :cell="2"  @click="toDetails(item)">
					<view>
						<image class="tui-vide-img" :src="item.image" :lazy-load="true" mode="aspectFill"></image>
					</view>
				</tui-grid-item>
			</block>
		</tui-grid>
	</view>
</template>

<script>
	export default {
		props: {
			list: { // 数据列表
				type: Array,
				default () {
					return []
				}
			}
		},
		methods: {
			toDetails(item) {
				let videoSrc=item.video
				console.log(videoSrc)
				uni.navigateTo({
					url: `../video/video-details?videoSrc=${videoSrc}`,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		},
	}
</script>

<style>
	.tui-vide-img {
		width: 348rpx;
		height: 462rpx;
		display: block;
		flex-shrink: 0;
	}
</style>
